<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
    <title>私信</title>
    <meta charset="utf-8">

    <link rel="stylesheet"  th:href="@{/asserts/css/common/scrollbar.css}">
    <link rel="stylesheet"  th:href="@{/asserts/css/letter.css}" />

    <script th:inline="javascript">
        /*<![CDATA[*/
        var toClientId=[[${toClient.id}]];
        var user_id=[[${session.user_id}]];
        var toClientPic=[[${toClient.pic}]];
        var user_logo=[[${session.user_logo}]]
        /*]]>*/
    </script>

    <script src="js/jquery-1.8.3.js" th:src="@{/asserts/js/common/jquery.js}"></script>
    <script src="js/index.js" th:src="@{/asserts/js/letter/letter.js}"></script>

</head>

<body>
<div id="header" th:replace="~{homepage :: navbar}"></div>
    <div class="letterwrap" style="text-align: -webkit-center">
        <div class="panel" style="width: 100%;">

            <div class="title">
                <div class="back" style="float: left"><a style="color:#333" href="/msg/sms/index" th:href="@{/letter}">&lt; 返回</a></div>
                <div class="name" th:text="${toClient.name}">用户id</div>
            </div>

            <div id="container">
                <div id="all_content">
                    <div id="all_dialog" th:each="letter:${detail}">
                    <div class="item-time" th:text="${letter.time}"></div>
                    <div class="item item-left" th:if="${session.user_id} ne ${letter.userId}">
                        <div class="img-head"><img src="image/headL.png" th:src="${toClient.pic}" alt="头像"></div>
                        <div class="content" th:text="${letter.content}"></div>
                    </div>
                    <div class="item item-right" th:if="${session.user_id} eq ${letter.userId}">
                        <div class="img-head"><img src="image/headR.png" th:src="${session.user_logo}" alt="头像"></div>
                        <div class="content" th:text="${letter.content}"></div>
                    </div>
                </div>
                </div>
            </div>
            <div class="edit_block">
                <div class="txt">
                    <textarea id="send_message"></textarea>
                </div>
                <a class="_j_send_msg"><i class="tips" style="color: rgba(0,0,0,0.78);">发送</i></a>
            </div>
    </div>

    </div>
</body>

</html>